qinglan.Canvas.Bullet = qinglan.Canvas.Particle.extend(function(id, position, opt){

	this.initPosition = null;

	this.lastPosition = null; 

	this.qlImg = opt.img || null; 

	this.used = true;

	this.init();

	qinglan.Canvas.Bullet.pool[this.id] = this;

}).methods({
	init: function(){ 
		this.initPosition = this.position.copy();
		this.lastPosition = this.position.copy(); 
	},
	reset: function(opt){
		opt.qlImg && (this.qlImg = opt.qlImg);
		this.position = opt.position;
		this.init();
	},
	draw: function(ctx) {
		this.qlImg ? this.qlImg.draw(ctx) : this.supr(ctx);
	},
	update: function(ctx) {
		this.lastPosition = this.position.copy();
	},
	isDie: function(){
		throw 'The isDie function must be implemented!';
	},
	destory: function(){
		this.used = false;
	}
}).statics({
	pool: {}
});
